precision mediump float;

uniform vec2 u_resolution;
float circleSDF(vec2 st, vec2 center, float radius) {
    return length(st - center) - radius;
}

void main() {

    vec2 st = gl_FragCoord.xy / u_resolution;

    float sdf = circleSDF(st, vec2(0.5,.5), 0.2);

    vec3 color = vec3(1.0, 0.0, 0.0); // 红色
    if (sdf < 0.0) {
        color = vec3(0.0, 1.0, 0.0); // 绿色
    }

    gl_FragColor = vec4(color,1.);
}